package com.tuanzhang.zhw.rpc.service.impl;

import com.tuanzhang.zhw.rpc.model.User;
import com.tuanzhang.zhw.rpc.service.UserService;

import java.util.concurrent.TimeUnit;

public class UserServiceImpl implements UserService {

    @Override
    public String hello(String name) {
        return name;
    }

    @Override
    public String helloTimeOut(String name) {
        try {
            Thread.sleep(50000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return name;
    }

    @Override
    public User getUser(String name) {
        return new User("001","22");
    }
}
